/* Modal de Autenticação Admin */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-in;
}

.auth-modal-overlay.show {
    display: flex;
}

.auth-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
}

.auth-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-modal-header .icon {
    font-size: 24px;
}

.auth-modal-body {
    padding: 30px;
}

.auth-modal-info {
    background: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 14px;
    color: #4a5568;
}

.auth-modal-info strong {
    display: block;
    color: #2d3748;
    margin-bottom: 5px;
}

.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-group label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.auth-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #718096;
    font-size: 18px;
    padding: 5px;
    transition: color 0.2s;
}

.auth-password-toggle:hover {
    color: #2d3748;
}

.auth-modal-footer {
    display: flex;
    gap: 12px;
    padding: 0 30px 30px;
}

.auth-modal-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-modal-btn-primary:active {
    transform: translateY(0);
}

.auth-modal-btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.auth-modal-btn-secondary:hover {
    background: #cbd5e0;
}

.auth-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-error-message {
    background: #fee;
    border-left: 4px solid #f56565;
    color: #c53030;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.auth-error-message.show {
    display: block;
    animation: shake 0.3s;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Loading state */
.auth-modal-btn.loading {
    position: relative;
    color: transparent;
}

.auth-modal-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 500px) {
    .auth-modal {
        width: 95%;
        margin: 20px;
    }
    
    .auth-modal-header {
        padding: 20px;
    }
    
    .auth-modal-body {
        padding: 20px;
    }
    
    .auth-modal-footer {
        padding: 0 20px 20px;
        flex-direction: column;
    }
}
