/**
 * JANELAS MODAIS E FORMULÁRIOS
 * Estrutura de pop-up para Cadastros e Gestão.
 */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px);
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 800;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.form-control,
.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--gray-border);
    border-radius: 10px;
    outline: none;
    font-size: 1rem;
    background: #fdfdfd;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(210, 35, 42, 0.1);
    background: white;
}

/* ==========================================================================
   MODAL DE SUCESSO DE RECONHECIMENTO FACIAL PREMIUM (ANTI-ROXO)
   ========================================================================== */
.modal-success-overlay {
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.success-card {
    text-align: center;
    border: 2px solid var(--success);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f0fff4 100%);
    box-shadow: 0 25px 50px -12px rgba(72, 187, 120, 0.4);
}

/* Animação elástica de entrada do modal content */
.animate-pop-in {
    transform: scale(0.85) translateY(15px) !important;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-out !important;
}

.modal-overlay.active .success-card.animate-pop-in {
    transform: scale(1) translateY(0) !important;
    opacity: 1;
}

/* Ícone de Sucesso */
.success-icon-wrapper {
    margin: 0 auto 1.5rem auto;
    width: 90px;
    height: 90px;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid rgba(72, 187, 120, 0.2);
}

.success-icon-wrapper i {
    font-size: 3.5rem;
    color: var(--success);
}

/* Animação do ícone em scale-up */
.animate-scale-up {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s, opacity 0.3s ease-out 0.15s;
}

.modal-overlay.active .animate-scale-up {
    transform: scale(1);
    opacity: 1;
}

/* Estilização dos textos */
.success-card h2 {
    color: #2f855a !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: -0.5px;
}

.success-card p {
    color: #4a5568;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Tag de Sucesso Pulsante */
.success-status-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--success);
    color: white;
    border-radius: 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(72, 187, 120, 0.3);
    animation: pulse-success-glow 1.5s infinite;
}

@keyframes pulse-success-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

/* ==========================================================================
   MODAL DE ALERTA DE ALUNO INATIVO (GLOBAL SSE)
   ========================================================================== */

.modal-inactive-overlay {
    background: rgba(0, 0, 0, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.modal-overlay.active .inactive-alert-card.animate-pop-in {
    transform: scale(1) translateY(0) !important;
    opacity: 1;
}

.inactive-alert-card {
    text-align: center;
    border: 2px solid var(--error, #dc3545);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    box-shadow: 0 25px 50px -12px rgba(220, 53, 69, 0.45);
}

/* Ícone de Bloqueio */
.inactive-icon-wrapper {
    margin: 0 auto 1.5rem auto;
    width: 90px;
    height: 90px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid rgba(220, 53, 69, 0.25);
}

.inactive-icon-wrapper i {
    font-size: 3.5rem;
    color: var(--error, #dc3545);
}

/* Textos da modal inativo */
.inactive-alert-card h2 {
    color: #b91c1c !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
    letter-spacing: -0.5px;
}

.inactive-alert-card p {
    color: #4a5568;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Tag de Bloqueio Pulsante */
.inactive-status-tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--error, #dc3545);
    color: white;
    border-radius: 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.35);
    animation: pulse-inactive-glow 1.5s infinite;
}

@keyframes pulse-inactive-glow {
    0%   { box-shadow: 0 0 0 0   rgba(220, 53, 69, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);   }
    100% { box-shadow: 0 0 0 0   rgba(220, 53, 69, 0);    }
}

