/* ============================================================== */
/* COMPONENTE GLOBAL DE NOTIFICAÇÕES MORALE (MoraleNotify)        */
/* Identidade Visual: Vermelho (#AD0606), Branco (#FFF), Grafite  */
/* ============================================================== */
#morale-notify-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2050;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

@media (max-width: 768px) {
    #morale-notify-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: calc(100% - 24px);
    }
}

.morale-toast {
    pointer-events: auto;
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    border: 1px solid #cbd5e1;
    border-left-width: 6px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: moraleToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.morale-toast.morale-toast-hiding {
    opacity: 0;
    transform: translateY(-8px);
}

@keyframes moraleToastIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.morale-toast-sucesso { border-left-color: #15803d; }
.morale-toast-atencao { border-left-color: #b45309; }
.morale-toast-validacao { border-left-color: #AD0606; }
.morale-toast-erro { border-left-color: #AD0606; background-color: #fffafa; }
.morale-toast-processando { border-left-color: #20252B; }

.morale-toast-icon {
    font-size: 1.35rem;
    line-height: 1;
    margin-top: 2px;
    flex-shrink: 0;
}

.morale-toast-sucesso .morale-toast-icon { color: #15803d; }
.morale-toast-atencao .morale-toast-icon { color: #b45309; }
.morale-toast-validacao .morale-toast-icon { color: #AD0606; }
.morale-toast-erro .morale-toast-icon { color: #AD0606; }
.morale-toast-processando .morale-toast-icon { color: #20252B; }

.morale-toast-body { flex: 1; min-width: 0; }

.morale-toast-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.morale-toast-sucesso .morale-toast-badge { background: #dcfce7; color: #166534; }
.morale-toast-atencao .morale-toast-badge { background: #fef3c7; color: #92400e; }
.morale-toast-validacao .morale-toast-badge { background: #fee2e2; color: #991b1b; }
.morale-toast-erro .morale-toast-badge { background: #AD0606; color: #ffffff; }
.morale-toast-processando .morale-toast-badge { background: #e2e8f0; color: #20252B; }

.morale-toast-msg {
    font-size: 0.9rem;
    font-weight: 500;
    color: #20252B;
    line-height: 1.42;
    word-break: break-word;
}

.morale-toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.morale-toast-close:hover,
.morale-toast-close:focus {
    background-color: #f1f5f9;
    color: #0f172a;
    outline: 2px solid #94a3b8;
}

.morale-campo-invalido {
    border-color: #AD0606 !important;
    box-shadow: 0 0 0 0.2rem rgba(173, 6, 6, 0.2) !important;
}

.morale-feedback-erro {
    color: #AD0606;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* ============================================================== */
/* MODAL GLOBAL DE CONFIRMAÇÃO E DIÁLOGOS MORALE                   */
/* ============================================================== */
.morale-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.morale-modal-backdrop.morale-modal-visible {
    opacity: 1;
}

.morale-modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(15, 23, 42, 0.12);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e2e8f0;
}

.morale-modal-backdrop.morale-modal-visible .morale-modal-dialog {
    transform: scale(1) translateY(0);
}

.morale-modal-topbar {
    height: 5px;
    width: 100%;
    background: #AD0606;
}

.morale-modal-destrutivo .morale-modal-topbar { background: #AD0606; }
.morale-modal-atencao .morale-modal-topbar { background: #d97706; }
.morale-modal-sucesso .morale-modal-topbar { background: #16a34a; }
.morale-modal-info .morale-modal-topbar { background: #20252B; }

.morale-modal-header {
    padding: 24px 24px 12px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.morale-modal-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.morale-modal-destrutivo .morale-modal-icon-circle {
    background: #fee2e2;
    color: #AD0606;
}

.morale-modal-atencao .morale-modal-icon-circle {
    background: #fef3c7;
    color: #b45309;
}

.morale-modal-sucesso .morale-modal-icon-circle {
    background: #dcfce7;
    color: #15803d;
}

.morale-modal-info .morale-modal-icon-circle {
    background: #f1f5f9;
    color: #20252B;
}

.morale-modal-header-text {
    flex: 1;
    min-width: 0;
}

.morale-modal-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.morale-modal-destrutivo .morale-modal-badge { background: #fee2e2; color: #991b1b; }
.morale-modal-atencao .morale-modal-badge { background: #fef3c7; color: #92400e; }
.morale-modal-sucesso .morale-modal-badge { background: #dcfce7; color: #166534; }
.morale-modal-info .morale-modal-badge { background: #e2e8f0; color: #20252B; }

.morale-modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.morale-modal-body {
    padding: 0 24px 20px 24px;
    color: #334155;
    font-size: 0.94rem;
    line-height: 1.55;
}

.morale-modal-actions {
    background: #f8fafc;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
}

.morale-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.morale-btn:focus-visible {
    outline: 2px solid #AD0606;
    outline-offset: 2px;
}

.morale-btn-secondary {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

.morale-btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.morale-btn-danger {
    background: #AD0606;
    color: #ffffff;
}

.morale-btn-danger:hover {
    background: #870404;
    color: #ffffff;
}

.morale-btn-primary {
    background: #20252B;
    color: #ffffff;
}

.morale-btn-primary:hover {
    background: #0f172a;
    color: #ffffff;
}

/* ============================================================== */
/* PADRONIZAÇÃO VISUAL SWEETALERT2 PARA IDENTIDADE MORALE          */
/* ============================================================== */
.swal2-container {
    z-index: 2200 !important;
}

.swal2-popup {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22) !important;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    padding: 24px !important;
}

.swal2-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.swal2-html-container {
    font-size: 0.95rem !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

.swal2-actions {
    margin-top: 20px !important;
    gap: 10px !important;
}

.swal2-confirm {
    background-color: #AD0606 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    box-shadow: none !important;
}

.swal2-confirm:hover {
    background-color: #870404 !important;
}

.swal2-cancel {
    background-color: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
}

.swal2-cancel:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
